package com.ciwong.epaper.modules.cordva.dao;

import com.ciwong.mobilelib.utils.EAction;

/**
 * Created by young on 2016/7/22.
 * 与H5交互相关事件
 */
public class CordvaAction extends EAction {
    /**
     *
     * 增加错题接口
     */
    public static final String ADD_BOOK_ERROR=HOST+"/v5/errorbook/set";
    /**
     *
     * 删除错题接口
     */
    public static final String DELETE_ERROR_BOOK=HOST+"/v5/errorbook/delete_by_Id";
    /**
     *
     * 查询错题接口
     */
    public static final String QUERY_ERROR_BOOK=HOST+"/v5/errorbook/get_list";


    /**
     * 根据作业ID获取作业详情
     */
    public static final String GET_USER_WORKDETAIL=HOST+"/v5/epaperwork/getUserWorkDetail";
    /**
     * 学生提交(在线作答,视频讲解)作业答案
     */
    public static final String SUBMIT_WORK=HOST+"/v5/epaperwork/submitWork";
    /**
     * 	老师上传[在线作答]批改答案
     */
    public static final  String CORRECT_ONLINE_PAPER=HOST+"/v5/epaperwork/correctOnlinePaper";
    /**
     * 学生/老师获取[视频讲解]答案
     */
    public static final String GET_VIEDO_EXPLAINANSWER=HOST+"/v5/epaperwork/getVideoExplainAnswer";
    /**
     * 学生/老师获取[在线作答]答案
     */
    public static final String GETONLINE_PAPER_ANSWER=HOST+"/v5/epaperwork/getOnlinePaperAnswer";

    /**
     * 获取视频播放信息
     */

    public static final String GET_VIDEO_PLAY_INFO=HOST+"/v5/service/v2/openvideo";



    @Override
    public String getActionUrl(String s) {

        if (s.equals(ADD_BOOK_ERROR))
        {
            return ADD_BOOK_ERROR;
        }else if(s.equals(DELETE_ERROR_BOOK)){
            return DELETE_ERROR_BOOK;
        }else if(s.equals(QUERY_ERROR_BOOK)){
            return QUERY_ERROR_BOOK;
        }else if(s.equals(GET_USER_WORKDETAIL)){
            return GET_USER_WORKDETAIL;
        }else if(s.equals(SUBMIT_WORK)){
            return SUBMIT_WORK;
        }else if(s.equals(CORRECT_ONLINE_PAPER)){
            return CORRECT_ONLINE_PAPER;
        }else if(s.equals(GET_VIEDO_EXPLAINANSWER)){
            return GET_VIEDO_EXPLAINANSWER;
        }else if(s.equals(GETONLINE_PAPER_ANSWER)){
            return GETONLINE_PAPER_ANSWER;
        }
        else if(s.equals(GET_VIDEO_PLAY_INFO)){
            return GET_VIDEO_PLAY_INFO;
        }
        return super.getActionUrl(s);
    }
}
